
document.addEventListener('DOMContentLoaded',setFontSize, false);
window.onresize = setFontSize;

function setFontSize(){
	document.documentElement.style.fontSize = document.documentElement.clientWidth/37.5 + 'px';
	if(document.documentElement.clientWidth > 801){
		document.documentElement.style.fontSize = 12 + 'px'
	}
}

const globelFunction = {

	//任务根据url参数去判断应该跳转的页面
	taskSwitch(url) {
		var taskName = "";

		switch (url) {
			case 3:
				taskName = "NM";
				break;
			case 4:
				taskName = "RA";
				break;
			case 5:
				taskName = "RA";
				break;
			case 6:
				taskName = "SOC";
				break;
			case 7:
				taskName = "raDialog";
				break;
			case 8:
				taskName = "SafeMeet";
				break;
			case 9:
				taskName = "VEHICLE";  //车检
				break;
			// case 10:
			// 	taskName = "freeTask";  //DSS
			// 	break;
			case 11:
				taskName = "JRA";  //JRA
				break;
			// case 15:
			// 	taskName = "freeTask";  //陪驾
			// 	break;
			case 17:
				taskName = "JRA";  //JRA
				break;
			case 18:
				taskName = "raDialog";  //RA
				break;
			case 19:
				taskName = "";  //视频
				break;
			case 20:
				taskName = "RA";
				break;
			case 21:
				taskName = "JRA";  //JRA
				break;
			case 22:
				taskName = "SafeMeet"; 
				break;
			case 27:
				taskName = "SOC";  //SOC
				break;
			case 39:
				taskName = "SOC"; 
				break;
			case 46:
				taskName = "SOC"; 
				break;
			// case 22:
			// 	taskName = "freeTask";   //常规任务雪地胎任务
			// 	break;
			// case 26:
			// 	taskName = "freeTask";   //雪地胎任务
			// 	break;
			// case 37:
			// 	taskName = "freeTask";   //视频 收集
			// 	break;
			default:
			    taskName = "freeTask";   //通用模板
				break; 
		}

		return taskName;
	}

}

export default globelFunction;


